/* 
 * File:   main.cpp
 * Author: pson
 *
 * Created on August 22, 2011, 1:23 PM
 */

#include <cstdlib>
#include <iostream>

#include "SceneManager.h"

using namespace std;

/*
 * 
 */
int main(int argc, char** argv) {

    SceneManager sm;
    if (argc < 2) {
        std::cout << "Usage: pmmconverter <input> [<output>]\n";
        return 0;
    }
    if (argc == 2) {
        char orig[256];
        strcpy(orig, argv[1]);
        char* fn = strtok(argv[1], ".");
        std::cout << "Converting: " << orig << " to " << fn << ".pmm\n";
        if (fn) {
            sm.loadModel(orig, strcat(fn, ".pmm"));
        }
    }
    if (argc == 3) {
        std::cout << "Converting: " << argv[1] << " to " << argv[2] << "\n";
        sm.loadModel(argv[1], argv[2]);
    }
    
    return 0;
}

